local unitName = "PK_ACU"

local unitDef = 
{
-- Internal settings
	BuildPic = "IAE_builder.png",
	Category = "MOBILE LAND SCOUT NOTHEAVY COMMANDER NOTAIR NOTSHIP NOTEPIC NOTSTEALTHY ALL",
	ObjectName = "PK_ACU.s3o",
	Side = "TANKS",
	TEDClass = "COMMANDER",
	commander = true,
	script = "PK_ACU_script.lua",
iconType = "acu",
	
-- Unit limitations and properties
	ActivateWhenBuilt = 1,
	BuildTime = 6000,
	Description = "Armored command unit",
	MaxDamage = 15500,
autoHeal=10,
	Name = "Peacekeeper ACU",
	RadarDistance = 1400,
	SightDistance = 800,
	SoundCategory = "TANK",
	Upright = 0,
	
-- Energy and metal related
	BuildCostEnergy = 9000,
buildCostMetal      = 1500,
EnergyMake = 75,
MetalMake = 5,
	
-- Pathfinding and related
	Acceleration = 0.15,
	BrakeRate = 0.1,
	FootprintX = 5,
	FootprintZ = 5,
	MaxSlope = 10,
	MaxVelocity = 1,
	MaxWaterDepth = 12,
	TurnRate = 900,
	movementclass = "HoverACU",
cantBeTransported=true,
	canHover=true,

-- Abilities
	Builder = 1,
	BuildDistance = 500,
	WorkerTime = 200,
     repairSpeed = 150,
     reclaimSpeed = 150,
	Reclaimable = 0,
	CanAttack = 1,
canReclaim=true,
	CanGuard = 1,
	CanMove = 1,
	CanPatrol = 1,
	LeaveTracks = 0,
	ShowNanoSpray = 1,
     CanBeAssisted = true,
	buildoptions = {
		"aeveria_factory",
		"diabloian_factory",
		"rach_factory",
	},
	
-- Weapons and related
	ExplodeAs = "T3_Pgen_Explosion",
	SelfDestructAs = "T3_Pgen_Explosion",
	SelfDestructCountdown = 5,

		customparams = {
			iscommander = true,
		},

weapons = {
        [1] = {
            def = "orangeblob",
	     onlyTargetCategory = [[LAND]],
        },

        [2] = {
            name  = "Striker_missiles",
	onlyTargetCategory = [[AIR VTOL]],
        },

    },
}

local weaponDefs = {
    orangeblob = {
		name = "Large Pyre Cannon",
		weapontype = "Cannon",
		accuracy = 10,
		areaofeffect = 25,
		avoidfeature = false,
		avoidfriendly = true,
		canattackground = true,
		collidefriendly = true,
		collisionsize = 8,
		commandfire = false,
		craterboost = 0,
		cratermult = 0,
		edgeeffectiveness = 0.1,
		explosionspeed = 256,
		impulseboost = 0,
		impulsefactor = 0,
		intensity = 1,
		noselfdamage = true,
		size = 3,
--        soundstart = "tank_fire",
        soundhit = "orangeblob_explo",
		range = 920,
		reloadtime = 1,
		rgbcolor = "1.0 1.0 1.0",
		turret = true,
		texture1 = "redflame",
	     stages                  = 60,
		 separation              = 1,
		weaponvelocity = 1600,
		explosiongenerator = "custom:TANKGUN_FX",
		damage =
		{
			default = 595,
		},
	},
}


unitDef.weaponDefs = weaponDefs
return lowerkeys({ [unitName]  =  unitDef })


